package Shuffle;

import java.util.List;
import java.util.Map;

public class PlayGame {
	
	pokeTypeB B;
	Player p;
	/**
	 * 測試用-幫我設定好一副牌的大小與玩家人數
	 */
	public void playCardTest(){
		B = new pokeTypeB(1000);	//產生一副牌，傳入參數洗牌1000次
		B.setCardOrder();					//設定牌組大小
		B.suffleCard();						//洗牌中
		p = new Player();			//產生玩家
		p.setPleyer(2);						//設定玩家人數
		p.setPlayerInfo();					//設定玩家資訊
		p.setPlayerCard(B.getCards());		//把產生出來的牌組，分給玩家
		System.out.println("發牌前");
		//p.showPlayerCards();				//秀出玩家拿到的牌
		System.out.println("\n發牌後排序");
		p.reSetPlayerCard(p);
		p.showPlayerCards();
		//p.showPlayerOrderCards(p);			//秀出玩家排序好的牌
		System.out.println("\n可能的對子");
		B.showPlayerPair(p);
		System.out.println("\n可能的三張");
		B.showPlayerThree(p);
		System.out.println("\n四張");
		B.showPlayerFour(p);
		System.out.println("\n葫蘆");
		B.showPlayerFullHouse(p);
		System.out.println("\n鐵支");
		B.showPlayerFourAKing(p);
		System.out.println("\n順子");
		B.showPlayerSnake(p);
		System.out.println("\n同花順");
		B.showPlayerSameColorSnake(p);
	}
	

	
	
	/**
	 * 測試用-牌點數大小印出
	 */
	public void pokeOrderTest(){
		Poke poke = new Poke();
		poke.setCardOrder();
		Map< String,Integer> allCardOrder = poke.getCardOrder();
		
		int order = 0;
		for(int i = 0 ; i < 4 ; i++){
			for(int j = 0 ; j < 13 ; j++){
				int pri = allCardOrder.get(poke.allCards[order]);
				System.out.print(poke.allCards[order]+"-"+pri + "\t");
				order++;
			}
			System.out.println();
		}
	}
}
